<? include ('../includes/functions.php'); ?>
<?

ob_start();
connectdb();
global $con;

//Post Params
//Post Params
$training_category = $_POST['training_category'];
$training_type = $_POST['training_type'];
$name = $_POST['name'];

$password_hash = sha1($password_plain);

//INSERT
$query = " INSERT INTO master-training ( training_category, training_type, name )  VALUES ( '$training_category', '$training_type', '$name' ) ";
$result = mysqli_query($con, $query);



if ($result) {
    $_SESSION["infomessage"] = "Master Training Added!";
    echo 'Success';
} else {
    $_SESSION["errormessage"] = "Adding Master Training Failed!";
    echo 'Query Failed';
}
header("Location: /index");
ob_end_flush();
?>